package m.stock.v1;

import com.google.gson.GsonBuilder;

import java.util.List;

/**
 * Created by maojianfeng on 8/5/16.
 */
public class ResultWrapper {
    private String stockCode;
    private int type;//1 minus, 2 positive
    private Integer days;
    private Double difference;
    private List<StockRecord> records;

    public ResultWrapper() {
    }

    public ResultWrapper(String stockCode, int type, Integer days, Double difference, List<StockRecord> records) {
        this.stockCode = stockCode;
        this.type = type;
        this.days = days;
        this.difference = difference;
        this.records = records;
    }

    public String getStockCode() {
        return stockCode;
    }

    public void setStockCode(String stockCode) {
        this.stockCode = stockCode;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Integer getDays() {
        return days;
    }

    public void setDays(Integer days) {
        this.days = days;
    }

    public Double getDifference() {
        return difference;
    }

    public void setDifference(Double difference) {
        this.difference = difference;
    }

    public List<StockRecord> getRecords() {
        return records;
    }

    public void setRecords(List<StockRecord> records) {
        this.records = records;
    }

    @Override
    public String toString() {
        return new GsonBuilder().setPrettyPrinting().create().toJson(this);
    }
}
